package com.zy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.entity.Resource;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface ResourceMapper extends BaseMapper<Resource> {

    //添加会议
    @Insert("insert into resource(address, remind) values(#{address},#{remind})")
    void addMetting(Resource resource);

    //删除会议
    @Delete("delete from resource where id = #{id}")
    void deleteMetting(Integer id);

    //修改会议
    @Update("update resource set address = #{address}, remind = #{remind} where id = #{id}")
    void modifyMetting(Resource resource);

    //查询会议
    @Select("select * from resource")
    List<Resource> listMetting();

}
